﻿
/* 
 * Since 2008 - 2012
 */
package com.hh.bss.project.entity;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import com.hh.bss.base.*;
import com.hh.bss.common.page.*;
import com.hh.bss.common.page.impl.*;
import com.hh.bss.project.dao.*;
import com.hh.bss.project.entity.*;
import com.hh.bss.project.service.*;
import com.hh.bss.project.vo.query.*;
import com.hh.bss.util.*;





public class SearchProjectCvCrm extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SearchProjectCvCrm";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_PROJECT_ID = "projectId";
	public static final String ALIAS_CV_ID = "cvId";
	public static final String ALIAS_PLAN_DT = "planDt";
	public static final String ALIAS_CRM_FOCUS = "crmFocus";
	public static final String ALIAS_CRM_TYPE = "crmType";
	public static final String ALIAS_CRM_DT = "crmDt";
	public static final String ALIAS_MINUTES = "minutes";
	public static final String ALIAS_TASK_STATUS = "taskStatus";
	public static final String ALIAS_CRM_RESULT = "crmResult";
	public static final String ALIAS_COMMENT = "comment";
	public static final String ALIAS_CREATE_DT = "createDt";
	public static final String ALIAS_MODIFIER = "modifier";
	public static final String ALIAS_MODIFIED_DT = "modifiedDt";
	
	//date formats
	public static final String FORMAT_PLAN_DT = DATE_TIME_FORMAT;
	public static final String FORMAT_CRM_DT = DATE_TIME_FORMAT;
	public static final String FORMAT_CREATE_DT = DATE_FORMAT;
	public static final String FORMAT_MODIFIED_DT = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	private java.lang.Integer id;
	@NotNull 
	private java.lang.Integer projectId;
	/**SearchList 名字*/
	private String projectName;
	
	@NotNull 
	private java.lang.Integer cvId;
	@NotNull 
	private java.util.Date planDt;
	private String planDtStr;
	@NotBlank @Length(max=1)
	private java.lang.String crmFocus;
	@NotBlank @Length(max=1)
	private java.lang.String crmType;
	
	private java.util.Date crmDt;
	private String crmDtStr;
	/**适合职位*/
	private String fitJob;
	/**人选联系标识*/
	private String cvFlags;
	
	
	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getFitJob() {
		return fitJob;
	}

	public void setFitJob(String fitJob) {
		this.fitJob = fitJob;
	}

	public String getCvFlags() {
		return cvFlags;
	}

	public void setCvFlags(String cvFlags) {
		this.cvFlags = cvFlags;
	}

	public String getPlanDtStr() {
		return planDtStr;
		//return DateConvertUtils.format(getPlanDt(), FORMAT_PLAN_DT);
	}

	public void setPlanDtStr(String planDtStr) {
		this.planDtStr = planDtStr;
	}

	public String getCrmDtStr() {
		return crmDtStr;
		//return DateConvertUtils.format(getCrmDt(), FORMAT_CRM_DT);
	}

	public void setCrmDtStr(String crmDtStr) {
		this.crmDtStr = crmDtStr;
	}

	private java.lang.Integer minutes;
	@NotNull @Max(32767)
	private Integer taskStatus;
	@Max(32767)
	private Integer crmResult;
	@Length(max=255)
	private java.lang.String comment;
	private java.lang.String creator;
	public java.lang.String getCreator() {
		return creator;
	}

	public void setCreator(java.lang.String creator) {
		this.creator = creator;
	}

	private java.util.Date createDt;
	@Length(max=50)
	private java.lang.String modifier;
	
	private java.util.Date modifiedDt;
	//columns END

	public SearchProjectCvCrm(){
	}

	public SearchProjectCvCrm(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setProjectId(java.lang.Integer value) {
		this.projectId = value;
	}
	
	public java.lang.Integer getProjectId() {
		return this.projectId;
	}
	public void setCvId(java.lang.Integer value) {
		this.cvId = value;
	}
	
	public java.lang.Integer getCvId() {
		return this.cvId;
	}
	public String getPlanDtString() {
		return DateConvertUtils.format(getPlanDt(), FORMAT_PLAN_DT);
	}
	public void setPlanDtString(String value) {
		setPlanDt(DateConvertUtils.parse(value, FORMAT_PLAN_DT,java.util.Date.class));
	}
	
	public void setPlanDt(java.util.Date value) {
		this.planDt = value;
	}
	
	public java.util.Date getPlanDt() {
		return this.planDt;
	}
	public void setCrmFocus(java.lang.String value) {
		this.crmFocus = value;
	}
	
	public java.lang.String getCrmFocus() {
		return this.crmFocus;
	}
	public void setCrmType(java.lang.String value) {
		this.crmType = value;
	}
	
	public java.lang.String getCrmType() {
		return this.crmType;
	}
	public String getCrmDtString() {
		return DateConvertUtils.format(getCrmDt(), FORMAT_CRM_DT);
	}
	public void setCrmDtString(String value) {
		setCrmDt(DateConvertUtils.parse(value, FORMAT_CRM_DT,java.util.Date.class));
	}
	
	public void setCrmDt(java.util.Date value) {
		this.crmDt = value;
	}
	
	public java.util.Date getCrmDt() {
		return this.crmDt;
	}
	public void setMinutes(java.lang.Integer value) {
		this.minutes = value;
	}
	
	public java.lang.Integer getMinutes() {
		return this.minutes;
	}
	public void setTaskStatus(Integer value) {
		this.taskStatus = value;
	}
	
	public Integer getTaskStatus() {
		return this.taskStatus;
	}
	public void setCrmResult(Integer value) {
		this.crmResult = value;
	}
	
	public Integer getCrmResult() {
		return this.crmResult;
	}
	public void setComment(java.lang.String value) {
		this.comment = value;
	}
	
	public java.lang.String getComment() {
		return this.comment;
	}
	public String getCreateDtString() {
		return DateConvertUtils.format(getCreateDt(), FORMAT_CREATE_DT);
	}
	public void setCreateDtString(String value) {
		setCreateDt(DateConvertUtils.parse(value, FORMAT_CREATE_DT,java.util.Date.class));
	}
	
	public void setCreateDt(java.util.Date value) {
		this.createDt = value;
	}
	
	public java.util.Date getCreateDt() {
		return this.createDt;
	}
	public void setModifier(java.lang.String value) {
		this.modifier = value;
	}
	
	public java.lang.String getModifier() {
		return this.modifier;
	}
	public String getModifiedDtString() {
		return DateConvertUtils.format(getModifiedDt(), FORMAT_MODIFIED_DT);
	}
	public void setModifiedDtString(String value) {
		setModifiedDt(DateConvertUtils.parse(value, FORMAT_MODIFIED_DT,java.util.Date.class));
	}
	
	public void setModifiedDt(java.util.Date value) {
		this.modifiedDt = value;
	}
	
	public java.util.Date getModifiedDt() {
		return this.modifiedDt;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("ProjectId",getProjectId())
			.append("CvId",getCvId())
			.append("PlanDt",getPlanDt())
			.append("CrmFocus",getCrmFocus())
			.append("CrmType",getCrmType())
			.append("CrmDt",getCrmDt())
			.append("Minutes",getMinutes())
			.append("TaskStatus",getTaskStatus())
			.append("CrmResult",getCrmResult())
			.append("Comment",getComment())
			.append("CreateDt",getCreateDt())
			.append("Modifier",getModifier())
			.append("ModifiedDt",getModifiedDt())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SearchProjectCvCrm == false) return false;
		if(this == obj) return true;
		SearchProjectCvCrm other = (SearchProjectCvCrm)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

